<template>
  <div class="twoCodeDiv">
    <img :src="imgUrl" mode="widthFix"> 
  </div>
</template>
<script>
  export default {
    data(){
      return{
        imgUrl: ''
      }
    },
    onShow() {
      this.$http.get("user/qr_code").then((res)=>{ 
        if(res.data.code == 0){
          this.imgUrl = res.data.data
        }else{
          wx.showToast({
              title: res.data.msg,
              icon: "none",
              duration: 2000,
              mask: true
          })
        }
      })
    },
  }
</script>
<style scoped>
.twoCodeDiv{
  width: 100%;
  height: 100%;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
}
.twoCodeDiv img{
  display: block;
}
</style>
